# Forked from Alpine for systemd

pkgname=gnome-session
pkgver=99947.0.1
_pkgver=47.0.1
pkgrel=0
pkgdesc="GNOME session manager"
url="https://gitlab.gnome.org/GNOME/gnome-session"
arch="all"
license="GPL-2.0-or-later"
depends="
	alsa-plugins-pulse
	bash
	dconf
	polkit
	"
makedepends="
	docbook-xml
	systemd-dev
	gnome-desktop-dev
	gnome-settings-daemon-dev
	gtk+3.0-dev
	itstool
	json-glib-dev
	libsm-dev
	libxml2-utils
	libxslt
	meson
	upower-dev
	xmlto
	"
options="!check" #no tests
subpackages="$pkgname-lang $pkgname-doc $pkgname-systemd"
source="https://download.gnome.org/sources/gnome-session/${_pkgver%%.*}/gnome-session-$_pkgver.tar.xz"
builddir="$srcdir/gnome-session-$_pkgver"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dsystemduserunitdir=/usr/lib/systemd/user \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}
sha512sums="
83268ab2531f1a98f1bb483ca8337cac97542445a1d83d6e8a478ebb3361eb4454e111278dc428a139a6de63741367bdbc3443e53183fd187ca1a768e5df67a3  gnome-session-47.0.1.tar.xz
"
